/*
 * @Author: Simon 1958058172@qq.com
 * @Date: 2025-08-19 11:48:32
 * @LastEditors: Simon 1958058172@qq.com
 * @LastEditTime: 2025-08-19 14:14:10
 * @FilePath: \java.1212\csdn\xiancheng\li02\Test02.java
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 */
package csdn.xiancheng.li02;

public class Test02 {
    public static void main(String[] args) {
        Thread t1=new Thread(){
            @Override
            public void run(){
                for (int i = 1; i < 31; i++) {
                    System.out.println("在线程t"+i);
                    try {
                        Thread.sleep(100);
                    } catch (InterruptedException e) {

                        e.printStackTrace();
                    }
                }
            }
        };
        t1.start();
        Runnable r=new Runnable() {
            @Override
            public void run(){
                for (int i = 100; i > 49; i--) {
                    System.out.println("在线程r"+i);
                    try {
                        Thread.sleep(200);
                    } catch (InterruptedException e) {

                        e.printStackTrace();
                    }
                }
            }
        };
        Thread t2=new Thread(r);
        t2.start();

        //修改优先级---优先级高的并不一定快---优先级并不能够确定最终结果
        t1.setPriority(1);
        t2.setPriority(2);
        //戏子如梦秋，轻轻别离，轻轻上心头
        //痴子多梦秋，恍若隔世，恍若在心头
        //温润如潮，常起常落
        //君子如风，不觉常伴
        //风有起止，潮有涨落
        //君兮君兮！何哉...
        //心不明不白，眼不能示君;心不言不语，...
        //人总以为自己是一颗小树，枝干歪歪扭扭，连新发的芽都带着怯生生的黄，辜负着春风一次次温柔的拂过。
        //风兮风兮吹我心，小星小星你要开心
    }
}
